how to calculate the formal charge